class Animal:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def speak(self):
        pass


class Dog(Animal):
    def speak(self):
        print(f'{self.age}岁的{self.name}在叫:汪汪汪')


class Cat(Animal):
    def speak(self):
        print(f'{self.age}岁的{self.name}在叫:喵喵喵')


class Bird(Animal):
    def speak(self):
        print(f'{self.age}岁的{self.name}在叫:叽叽喳喳')


if __name__ == '__main__':
    animals = [Dog('spike', 8), Cat('tom', 6), Bird('jerry', 4)]
    for animal in animals:
        animal.speak()
